Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: do not link in the headings #9416

Closed

Conversation

thefourtheye
Copy link
Contributor

Checklist
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc buffer

Description of change

If there is a link in the headings, when the ToC is generated, that is
not properly linked, instead the square brackets are left as they are.

Even if we fix this, different parts of the heading will link to
different sections or even different pages. For example,

### What makes [`Buffer.allocUnsafe()`] and
      [`Buffer.allocUnsafeSlow()`] "unsafe"?

will point to three different sections. allocUnsafe and
allocUnsafeSlow will link to their corresponding sections and all
other words actully link to the heading in the document. This could be
visually confusing.

Fixes: #9331


cc @mscdex @silverwind

@nodejs-github-bot nodejs-github-bot added buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to the documentations. labels Nov 2, 2016
@silverwind
Copy link
Contributor

LGTM. I guess these kind of links never worked?

Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit message typo: actully

LGTM

@thefourtheye
Copy link
Contributor Author

thefourtheye commented Nov 2, 2016

@silverwind Yes, when ToC is generated, the links on the markdown are NOT passed on. So they never worked I guess.

If there is a link in the headings, when the ToC is generated, that is
not properly linked and the square brackets are left as they are.

Even if we fix this, different parts of the heading will link to
different sections or even different pages. For example,

    ### What makes [`Buffer.allocUnsafe()`] and
          [`Buffer.allocUnsafeSlow()`] "unsafe"?

will point to three different sections. `allocUnsafe` and
`allocUnsafeSlow` will link to their corresponding sections and all
other words actually link to the heading in the document. This could be
visually confusing.

Fixes: nodejs#9331
@thefourtheye
Copy link
Contributor Author

@addaleax Thank you :-) Fixed it.

@mscdex
Copy link
Contributor

mscdex commented Nov 2, 2016

LGTM

@thefourtheye
Copy link
Contributor Author

Landed in 5d0761f

@thefourtheye thefourtheye deleted the doc-buffer-header-dont-link branch November 5, 2016 09:45
thefourtheye added a commit that referenced this pull request Nov 5, 2016
If there is a link in the headings, when the ToC is generated, that is
not properly linked and the square brackets are left as they are.

Even if we fix this, different parts of the heading will link to
different sections or even different pages. For example,

    ### What makes [`Buffer.allocUnsafe()`] and
          [`Buffer.allocUnsafeSlow()`] "unsafe"?

will point to three different sections. `allocUnsafe` and
`allocUnsafeSlow` will link to their corresponding sections and all
other words actually link to the heading in the document. This could be
visually confusing.

PR-URL: #9416
Fixes: #9331

Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Brian White <mscdex@mscdex.net>
evanlucas pushed a commit that referenced this pull request Nov 7, 2016
If there is a link in the headings, when the ToC is generated, that is
not properly linked and the square brackets are left as they are.

Even if we fix this, different parts of the heading will link to
different sections or even different pages. For example,

    ### What makes [`Buffer.allocUnsafe()`] and
          [`Buffer.allocUnsafeSlow()`] "unsafe"?

will point to three different sections. `allocUnsafe` and
`allocUnsafeSlow` will link to their corresponding sections and all
other words actually link to the heading in the document. This could be
visually confusing.

PR-URL: #9416
Fixes: #9331

Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Brian White <mscdex@mscdex.net>
MylesBorins pushed a commit that referenced this pull request Nov 11, 2016
If there is a link in the headings, when the ToC is generated, that is
not properly linked and the square brackets are left as they are.

Even if we fix this, different parts of the heading will link to
different sections or even different pages. For example,

    ### What makes [`Buffer.allocUnsafe()`] and
          [`Buffer.allocUnsafeSlow()`] "unsafe"?

will point to three different sections. `allocUnsafe` and
`allocUnsafeSlow` will link to their corresponding sections and all
other words actually link to the heading in the document. This could be
visually confusing.

PR-URL: #9416
Fixes: #9331

Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Brian White <mscdex@mscdex.net>
@MylesBorins MylesBorins mentioned this pull request Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

doc: buffer TOC incorrectly contains brackets
9 participants